<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app">
    <my_table :abc="stus"></my_table>
</div>
<template id="my_table">
    <table border="1">
        <tr><td>编号</td><td>姓名</td></tr>
        <tr v-for="(stu,index) in abc"><td>{{stu.id}}</td><td>{{stu.name}}</td></tr>
    </table>
</template>
<script type="text/javascript" src="../js/vue-2.6.12.js"></script>
<script>
    const my_table={
        template:"#my_table",
        props:["abc"]
    }
    new Vue({
        el:"#app",
        data:{
             stus:[{id:1,name:"zhangsan"},{id:2,name:"lisi"}]
         },
        components:{
            my_table
        }
    });
</script>
</body>
</html>